import { createRouter, createWebHashHistory } from 'vue-router'
import layout from '../layout/main.vue';
const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: '/',
      name: 'home',
      component: layout,
      redirect: '/index',
      children: [
        {
          path: '/index',
          name: 'index',
          component: () => import('../renderer/src/views/index/layout.vue'),
          redirect: '/index/home',
          children: [
            {
              path: '/index/home',
              name: '首页',
              component: () => import('../renderer/src/views/index/index.vue')
            },
            {
              path: '/index/account',
              name: '账号管理',
              component: () => import('../renderer/src/views/index/account/layout.vue'),
              redirect: '/index/account/allAccount',
              children: [
                {
                  path: '/index/account/allAccount',
                  name: '全部账号',
                  component: () => import('../renderer/src/views/index/account/allAccount.vue')
                },
                {
                  path: '/index/account/interstellarAccount',
                  name: '星际账号',
                  component: () =>
                    import('../renderer/src/views/index/account/interstellarAccount.vue')
                },
                {
                  path: '/index/account/pendingAccount',
                  name: '待托管账密',
                  component: () => import('../renderer/src/views/index/account/pendingAccount.vue')
                },
                {
                  path: '/index/account/pendingAuthorization',
                  name: '待授权',
                  component: () => import('../renderer/src/views/index/account/pendingAuthorization.vue')
                },
                {
                  path: '/index/account/pendingDeviceBinding',
                  name: '待绑定设备',
                  component: () => import('../renderer/src/views/index/account/pendingDeviceBinding.vue')
                },
                {
                  path: '/index/account/shareAccount',
                  name: '共享账号',
                  component: () => import('../renderer/src/views/index/account/shareAccount.vue')
                },

              ]
            }, {
              path: '/index/device',
              name: '设备管理',
              redirect: '/index/device/allDevice',
              component: () => import('../renderer/src/views/index/device/deviceLayout.vue'),
              children: [
                {
                  path: '/index/device/allDevice',
                  name: '全部设备',
                  component: () => import('../renderer/src/views/index/device/allDevice.vue')
                },
              ]
            }, {
              path: '/index/speed',
              name: '费用管理',
              redirect: '/index/speed/speed',
              component: () => import('../renderer/src/views/index/speed/speedLayout.vue'),
              children: [
                {
                  path: '/index/speed/speed',
                  name: '账号充值',
                  component: () => import('../renderer/src/views/index/speed/topUp.vue')// 需要改到对应页面
                }, {
                  path: '/index/speed/2',
                  name: '余额明细',
                  component: () => import('../renderer/src/views/index/speed/balance.vue')// 需要改到对应页面
                }, {
                  path: '/index/speed/cost',
                  name: '订单管理',
                  component: () => import('../renderer/src/views/index/speed/cost.vue')
                }
              ]
            },
            {
              path: '/index/emp',
              name: '企业管理',
              redirect: '/index/emp/emp',
              component: () => import('../renderer/src/views/index/emp/empLayout.vue'),
              children: [
                {
                  path: '/index/emp/emp',
                  name: 'xxxz',
                  component: () => import('../renderer/src/views/index/emp/empManagement.vue')
                },
              ]
            },
            {
              path: '/index/product',
              name: '产品购买',
              redirect: '/index/product/product',
              component: () => import('../renderer/src/views/index/product/productLayout.vue'),
              children: [
                {
                  path: '/index/product/product',
                  name: 'xxxz',
                  component: () => import('../renderer/src/views/index/product/product.vue')
                },
              ]
            }
          ]
        }, {
          path: '/message',
          name: '消息中心',
          component: () => import('../renderer/src/views/message/message.vue'),
        }
      ]
    }
  ]
})
export default router

